<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */

function widget_search(&$setting,&$smarty){
    //$setting['search']=$GLOBALS['search'];
    $data['search_key'] = $GLOBALS['runtime']['search_key'];	
	$obj = kernel::service('autocomplete.associate_autocomplete_goods');
	if ($obj && method_exists($obj, 'get_widgets_top_html')){
		$data['top_html'] = $obj->get_widgets_top_html(); 
	}
	if ($obj && method_exists($obj, 'get_widgets_bottom_html')){
		$data['bottom_html'] = $obj->get_widgets_bottom_html();
	}
    
    return $data;
}
?>
